package com.mofeng.myshop.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mofeng.myshop.domain.po.Commodity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 商品信息 Mapper 接口
 * </p>
 *
 * @author MoFeng
 * @since 2024-04-17
 */
public interface CommodityMapper extends BaseMapper<Commodity> {

    Page<Commodity> findList(@Param("name") String name,
                             @Param("projectId") Long projectId,
                             @Param("categoryId") Long categoryId,
                             @Param("delete") String delete,
                             Page<Commodity> page);

    @Select("SELECT * FROM `tb_commodity`")
    List<Commodity> findAll();
}
